import axios from 'axios';

export const getCodeGeneration = async (description,name,params,samples,reList,llmName) => {
    try {
        const response = await axios.post('/chat/code', {
            description,
            name,
            params,
            samples,
            reList,
            llmName
        });
        
        return response.data;
    } catch (error) {
        return {
            status: 1001,
            code: "生成代码失败"
        };
    }
};
